package com.chinastock.log;

import com.chinastock.Constant;
import org.apache.logging.log4j.ThreadContext;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * @author wangzhendong
 */
public class TraceInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
       ThreadContext.put(Constant.TRACE_ID, "NAN");
//        TraceContext.traceId()
        return true;
    }
}
